﻿using System;
using System.Collections.Generic;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Caliburn.Micro;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using RemoteControl.Localization;
using VirtualKeyboard.Controls;

namespace RemoteControl.Views
{
    public partial class MainPage
    {
        private readonly Color backColor = Color.FromArgb(0, 0, 0, 0);
        // 构造函数
        public MainPage()
        {
            InitializeComponent();
            ApplicationBar.MenuItems.Add(new AppBarMenuItem { Message = "GoToConfig", Text = AppResources.Settings });
            ApplicationBar.MenuItems.Add(new AppBarMenuItem { Message = "GoToAbout", Text = AppResources.About });
        }

        private void OnAppBarStateChanged(object sender, ApplicationBarStateChangedEventArgs e)
        {
            ApplicationBar.BackgroundColor = e.IsMenuVisible ? backColor : Colors.Transparent;
        }
    }
}